package com.corn.turorial.spring.controller;

import com.corn.turorial.spring.data.model.UserWithValidator;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author : Jim Wu
 * @version 1.0
 * @function :
 * @since : 2022/7/18 15:32
 */
@RestController
public class I18NValidatorController {

    @PostMapping("/testI18n")
    public UserWithValidator testI18n(@RequestBody @Validated UserWithValidator userWithValidator) {
        int i = 1 / 0;
        return userWithValidator;
    }
}
